import axios from 'axios'
import qs from 'qs'
import Appfooter from '@/components/appfooter'
const apiURL='http://127.0.0.1:3310'
const imgURL='http://127.0.0.1:3310'
axios.defaults.baseURL=apiURL
axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';
axios.defaults.transformRequest=function(data,header){
    return qs.stringify(data)
}

export default{
    install(Vue,options){
        Vue.prototype.apiURL=apiURL;
        Vue.prototype.imgURL=imgURL;
        Vue.prototype.axios=axios;
        Vue.component("Appfooter",Appfooter);
        Vue.prototype.cars=new Vue({
            data(){
                return {
                    cars:{}
                }
            }
        }).cars

    }
}